import request from '@/utils/request'
// import store from '@/store'

// 获取用户基本信息
export function getUserBaseInfo() {
  return request({
    method: 'GET',
    url: '/v1_0/user',
    // headers: {
    //   Authorization: `Bearer ${store.state.user.token}`,
    // },
  })
}

// 发送验证码
export function sendCode(mobile) {
  return request({
    method: 'GET',
    url: `/v1_0/sms/codes/${mobile}`,
  })
}

// 登录
//  data - { mobile, code }
export function login(data) {
  return request({
    method: 'POST',
    url: '/v1_0/authorizations',
    data,
  })
}
